package myproject.computer;

/**
 * @author shkstart
 * @creat 2022-04-15:59
 */
public class SoftWare {
    private String wareName;
    private int size;//文件大小

    public SoftWare() {
    }

    public SoftWare(String wareName, int size) {
        this.wareName = wareName;
        this.size = size;
    }

    public String getWareName() {
        return wareName;
    }

    public void setWareName(String wareName) {
        this.wareName = wareName;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    //软件启动
    public void run() {
        System.out.println(wareName + "启动");
    }

    //软件关闭
    public void stop() {
        System.out.println(wareName + "关闭");
    }

    @Override
    public String toString() {
        return "软件名称：" + wareName + ", 大小：" + size + "Mb";
    }
}
